'use strict';
const db = uniCloud.database();
exports.main = async (event, context) => {
	//event为客户端上传的参数
	let status=2;
	let res_msg="";
	let body=event.body
	let body_json=JSON.parse(body)
	let sailing_pet={
		"pet_template_id":body_json.pet_template_id,
		"need_money":body_json.need_money
	}

	const collection = db.collection('SailingPet');
	let res=await collection.add(sailing_pet);
	res_msg="新增成功"
	//返回数据给客户端
	return {"status":status,"res_msg":res_msg}

};

